import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';

export default async function a003(fd: IFeidaoAiBrowserComponent) {
	// todo
	//取消全选
	const list = fd.data.node.querySelectorAll('[data-id="list"]');

	const ns_chk = fd.data.node.querySelectorAll('[data-id="list"]:checked');

	const all = fd.data.node.querySelector<HTMLInputElement>('[data-id="all"]');

	if (Array.from(list).length === Array.from(ns_chk).length) {
		all.checked = true;
	} else {
		all.checked = false;
	}
}
